package zuoye.ershouche.service.impl;




import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import zuoye.ershouche.entity.User;
import zuoye.ershouche.mapper.UserMapper;
import zuoye.ershouche.service.UserService;

import java.util.List;

@Service
public class UserServiceImpl implements UserService {

    @Autowired
    UserMapper userMapper;

    @Override
    public int insertUser(User user) {
        return userMapper.insertUser(user);
    }

    @Override
    public List<User> getUserList(int pageNum, int pageSize) {
        System.out.println(userMapper.selectUsersList(pageNum, pageSize));
        return userMapper.selectUsersList(pageNum, pageSize);
    }

    @Override
    public int deleteUserById(int id) {
        return userMapper.deleteUserById(id);
    }

    @Override
    public List<User> selectUsersAll() {
        return userMapper.selectUsersAll();
    }

}
